package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.StockInTypeManagementMapper;
import com.ruoyi.system.domain.StockInTypeManagement;
import com.ruoyi.system.service.IStockInTypeManagementService;

/**
 * 入库类型设置 Service业务层处理
 *
 * @author ruoyi
 * @date 2025-05-29
 */
@Service
public class StockInTypeManagementServiceImpl implements IStockInTypeManagementService
{
    @Autowired
    private StockInTypeManagementMapper stockInTypeManagementMapper;

    /**
     * 通过id查询入库类型设置
     *
     * @param id 入库类型设置主键
     * @return 入库类型设置
     */
    @Override
    public StockInTypeManagement selectStockInTypeManagementById(Long id)
    {
        return stockInTypeManagementMapper.selectStockInTypeManagementById(id);
    }

    /**
     * 通过入库类型名称查询入库类型设置列表
     *
     * @param typeName 入库类型名称
     * @return 入库类型设置
     */
    @Override
    public List<StockInTypeManagement> selectStockInTypeManagementListByName(String typeName)
    {
        return stockInTypeManagementMapper.selectStockInTypeManagementListByName(typeName);
    }

    /**
     * 新增入库类型设置
     *
     * @param stockInTypeManagement 入库类型设置
     * @return 结果
     */
    @Override
    public int insertStockInTypeManagement(StockInTypeManagement stockInTypeManagement)
    {
        return stockInTypeManagementMapper.insertStockInTypeManagement(stockInTypeManagement);
    }

    /**
     * 修改入库类型设置
     *
     * @param stockInTypeManagement 入库类型设置
     * @return 结果
     */
    @Override
    public int updateStockInTypeManagement(StockInTypeManagement stockInTypeManagement)
    {
        return stockInTypeManagementMapper.updateStockInTypeManagement(stockInTypeManagement);
    }

    /**
     * 通过id批量删除入库类型设置信息
     *
     * @param ids 需要删除的入库类型设置主键
     * @return 结果
     */
    @Override
    public int deleteStockInTypeManagementByIds(Long[] ids)
    {
        return stockInTypeManagementMapper.deleteStockInTypeManagementByIds(ids);
    }

    /**
     * 通过id删除入库类型设置信息
     *
     * @param id 入库类型设置主键
     * @return 结果
     */
    @Override
    public int deleteStockInTypeManagementById(Long id)
    {
        return stockInTypeManagementMapper.deleteStockInTypeManagementById(id);
    }
}
